<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
                "http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
  <title>Description of clear_edges</title>
  <meta name="keywords" content="clear_edges">
  <meta name="description" content="clear_edges(g) --- delete all edges of g">
  <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  <meta name="generator" content="m2html &copy; 2003 Guillaume Flandin">
  <meta name="robots" content="index, follow">
  <link type="text/css" rel="stylesheet" href="../../m2html.css">
</head>
<body>
<a name="_top"></a>
<div><a href="../../index.html">Home</a> &gt;  <a href="../index.html">matgraph</a> &gt; <a href="index.html">@graph</a> &gt; clear_edges.m</div>

<!--<table width="100%"><tr><td align="left"><a href="../../index.html"><img alt="<" border="0" src="../../left.png">&nbsp;Master index</a></td>
<td align="right"><a href="index.html">Index for matgraph/@graph&nbsp;<img alt=">" border="0" src="../../right.png"></a></td></tr></table>-->

<h1>clear_edges
</h1>

<h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>clear_edges(g) --- delete all edges of g</strong></div>

<h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="box"><strong>function clear_edges(g) </strong></div>

<h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre class="comment"> clear_edges(g) --- delete all edges of g</pre></div>

<!-- crossreference -->
<h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
This function calls:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="issparse.html" class="code" title="function yn = issparse(g)">issparse</a>	issparse(g) --- check if g's adjacency matrix is sparse</li><li><a href="nv.html" class="code" title="function n = nv(g)">nv</a>	nv(g) --- number of vertices in g</li><li><a href="sparse.html" class="code" title="function sparse(g)">sparse</a>	sparse(g) --- convert internal storage for g to sparse</li></ul>
This function is called by:
<ul style="list-style-image:url(../../matlabicon.gif)">
<li><a href="cartesian.html" class="code" title="function cartesian(g,h1,h2)">cartesian</a>	cartesian(g,h1,h2) --- overwrite g with the product of h1 and h2</li><li><a href="circulant.html" class="code" title="function circulant(g,n,k)">circulant</a>	circulant(g,n,k) --- overwrite g with an n,k circulant graph</li><li><a href="cube.html" class="code" title="function cube(g,k)">cube</a>	cube(g,k) --- create a k-cube (default k = 3)</li><li><a href="dfstree.html" class="code" title="function dfstree(t,g,v)">dfstree</a>	dfstree(t,g,v) --- create a depth-first spanning tree of g</li><li><a href="dodecahedron.html" class="code" title="function dodecahedron(g)">dodecahedron</a>	dodecahedron(g) --- overwrite g with the dodecahedron graph</li><li><a href="hamiltonian_cycle.html" class="code" title="function [hlist, exists] = hamiltonian_cycle(g,h)">hamiltonian_cycle</a>	hamiltonian_cycle(g) --- find a Hamiltonian cycle in g (if one exists)</li><li><a href="icosahedron.html" class="code" title="function icosahedron(g)">icosahedron</a>	icosahedron(g) --- overwrite g with the icosahedron graph</li><li><a href="interval_graph.html" class="code" title="function interval_graph(g,ilist)">interval_graph</a>	interval_graph(g,ilist) --- create an interval graph</li><li><a href="line_graph.html" class="code" title="function line_graph(g,h)">line_graph</a>	line_graph(g,h) --- set g to be the line graph of h</li><li><a href="octahedron.html" class="code" title="function octahedron(g)">octahedron</a>	octahedron(g) --- overwrite g with the octahedron graph, K(2,2,2)</li><li><a href="random_regular.html" class="code" title="function random_regular(g,n,k)">random_regular</a>	random_regular(g,n,k) --- create a random regular graph</li><li><a href="random_tree.html" class="code" title="function random_tree(t,n)">random_tree</a>	random_tree(t,n) --- overwrite t with a random tree on n vertices</li><li><a href="selective.html" class="code" title="function selective(g,n,n0,d)">selective</a>	selective(g,n,n0,d) --- selective attachment random graph</li></ul>
<!-- crossreference -->


<h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2>
<div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function clear_edges(g)</a>
0002 <span class="comment">% clear_edges(g) --- delete all edges of g</span>
0003 
0004 <span class="keyword">global</span> GRAPH_MAGIC
0005 
0006 n = <a href="nv.html" class="code" title="function n = nv(g)">nv</a>(g);
0007 
0008 <span class="keyword">if</span> (<a href="issparse.html" class="code" title="function yn = issparse(g)">issparse</a>(g))
0009     GRAPH_MAGIC.graphs{g.idx}.array = <span class="keyword">...</span>
0010         logical(<a href="sparse.html" class="code" title="function sparse(g)">sparse</a>([],[],[],n,n,0));
0011 <span class="keyword">else</span>
0012     GRAPH_MAGIC.graphs{g.idx}.array = false(n);
0013 <span class="keyword">end</span></pre></div>
<hr><address>Generated on Fri 30-Apr-2010 07:51:16 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> &copy; 2003</address>
</body>
</html>